package com.demo.db.redis

import org.springframework.data.redis.core.StringRedisTemplate
import org.springframework.stereotype.Service

@Service
class RedisService(val stringRedisTemplate: StringRedisTemplate) {
    fun saveID(value: String) {
        stringRedisTemplate.opsForValue().set("id", value)
    }

    fun readID(): String {
        return stringRedisTemplate.opsForValue().get("id") ?: ""
    }
}
